#! /bin/bash
#本程序功能为关闭所有打开的终端
ppid=`ps -ef |grep "terminal" |grep -v "grep" |cut -c 10-15`
if [ ! $ppid ];then
    echo "进程不存在"
else
    for line in `ps -ef |grep $ppid |grep -v "grep" |cut -c 10-15`;do
        #echo $line
        kill -9 $line
    done
fi
